package api.betfairAPI;

import api.APICallTypes;

/**
 * User: Darren
 * Note: Free access limits sourced from here:
 *  http://bdp.betfair.com/index.php?option=com_content&task=view&id=36&Itemid=64
 */
public enum BetfairAPICallTypes implements APICallTypes {
    LOGIN(24),
    LOGOUT(-1),
    GET_ACTIVE_EVENT_TYPES(-1),
    GET_EVENTS(-1),
    GET_MARKET(5),
    GET_MARKET_PRICES_COMPRESSED(60),
    GET_BET(60);

    private int freeAccessLimitPerMinute;

    BetfairAPICallTypes(int freeAccessLimitPerMinute) {
        this.freeAccessLimitPerMinute = freeAccessLimitPerMinute;
    }

    @Override
    public int getLimit() {
        return freeAccessLimitPerMinute;
    }

    @Override
    public String getName() {
        return this.name();
    }
}